//
//  MYWebService.h
//  投融保
//
//  Created by 523 on 13-12-28.
//  Copyright (c) 2013年 木叶科技. All rights reserved.
//

#import <Foundation/Foundation.h>

#define URL [NSURL URLWithString:@"http://ppm.yijifu.net:8607/eloan/gateWay.htm"]
//#define URL [NSURL URLWithString:@"http://192.168.1.100:8083/eloan/gateWay.htm"]
@protocol ServiceHelperDelegate
@optional
//非队列异步请求
-(void)finishTouZiRequest:(NSArray *)asyData;
-(void)finishHuaRuRequest:(NSArray *)asyData;
-(void)finishHuaChuRequest:(NSArray *)asyData;
-(void)proFinishRequest:(NSDictionary *)asyData;
-(void)proUnfinishRequest:(NSDictionary *)asyData;
-(void)finishSuccessRequest:(NSDictionary *)asyData;
-(void)finishFailRequest:(NSError*)error;
@end

@interface MYWebService : NSObject


@property(nonatomic,assign) id<ServiceHelperDelegate> delegate;
//初始化
-(id)initWithDelegate:(id<ServiceHelperDelegate>)theDelegate;

@property(nonatomic,strong)NSDictionary *profileDataAsyn;
@property(nonatomic,strong)NSDictionary *profileDataSyn;
@property(nonatomic,strong)NSDictionary *proFinishDic;
@property(nonatomic,strong)NSDictionary *proUnfinishDic;
@property(nonatomic,strong)NSDictionary *huaRuDic;
@property(nonatomic,strong)NSDictionary *huaChuDic;
@property(nonatomic,strong)NSDictionary *touZiDic;

//@property(nonatomic,strong)NSDictionary *profileDataSyn;

//不用单列了
//+(MYWebService *)sharedWebService;

//异步请求
- (void)getDataAsynWithKey:(NSString *)key encryptedString:(NSString *)encryptedString appKey:(NSString *)appKey;
//公用异步请求
- (void)publicGetDataAsynWithKey:(NSString *)key encryptedString:(NSString *)encryptedString appKey:(NSString *)appKey;
//同步请求
- (NSDictionary *)getDataSynWithKey:(NSString *)key encryptedString:(NSString *)encryptedString appKey:(NSString *)appKey;
- (void)getDataAsynQueueWithKey:(NSString *)key encryptedString:(NSString *)encryptedString appKey:(NSString *)appKey;
//得到划入记录
- (void)getHuaRuAsynWithKey:(NSString *)key encryptedString:(NSString *)encryptedString appKey:(NSString *)appKey;
//异步获取投资记录
- (void)getTouZiAsynWithKey:(NSString *)key encryptedString:(NSString *)encryptedString appKey:(NSString *)appKey;
//得到划出记录
- (void)getHuaChuAsynWithKey:(NSString *)key encryptedString:(NSString *)encryptedString appKey:(NSString *)appKey;
//未完成项目异步
- (void)getUnfinishAsynWithKey:(NSString *)key encryptedString:(NSString *)encryptedString appKey:(NSString *)appKey;
- (void)getProFinishAsynWithKey:(NSString *)key encryptedString:(NSString *)encryptedString appKey:(NSString *)appKey;
@end
